package com.hackordie.commons.hardware.computer.test;

import com.hackordie.commons.hardware.components.Firewall;
import com.hackordie.commons.hardware.components.HardDisk;
import com.hackordie.commons.hardware.components.NetworkCard;
import com.hackordie.commons.hardware.components.PowerSupply;
import com.hackordie.commons.hardware.components.Processor;
import com.hackordie.commons.hardware.components.RamMemory;
import com.hackordie.commons.hardware.computer.Computer;
import com.hackordie.commons.hardware.computer.IComputer;

public class CreateComputer {

    public static String computerName = "pc1";
    public static String Firewall1 = "Firewall 1";
    public static String PowerSupply = "Fuente alimentacion 1";
    public static String HardDisk1 = "Disco Duro 1";
    public static String NetworkCard1 = "Tarjeta de red 1";
    public static String Processor1 = "Procesador 1";
    public static String RamMemory1 = "Memoria RAM 1";
    
    public static int HardDiskCapacity = 100;
    public static int RamMemoryCapacity = 2048;
    
    public static int ProcessorCapacity = 500;
    public static int ProcessorCores = 1;
    public static int LevelSekillCapacityProcessor = 100;
    public static int PowerSupplyEnergy = 100;      
    
    
    //OperativeSistem
    public static String OSName = "windows";
    public static String OSDescription = "sistema operativo windows";
    public static int    OSSize = 2;
    public static int    OSRequiredRam = 2;
    public static int    OSRequiredProcessor = 10;
    
    public static IComputer createComputerComplete1(String ipDirection) {
        
        //ordenador basico con un componente de cada tipo y 2000 u. de precio
        IComputer pc = new Computer(computerName, 1, 1, 1, 1, 1, 1, 2000);
        
        pc.addComponent(new Firewall(Firewall1, 10, 5, 10));
        pc.addComponent(new PowerSupply(PowerSupply, PowerSupplyEnergy, 10));
        pc.addComponent(new HardDisk(HardDisk1, 10, HardDiskCapacity, 10));
        pc.addComponent(new NetworkCard(NetworkCard1, 10, ipDirection, 100, 10));
        pc.addComponent(new Processor(Processor1, 10, ProcessorCapacity, ProcessorCores, LevelSekillCapacityProcessor, 10));
        pc.addComponent(new RamMemory(RamMemory1, 10, RamMemoryCapacity, 10));
        
        return pc;
    }
}
